package othello.players;


import java.awt.Color;
import java.util.Observer;
import java.util.List;
import othello.model.Action;

import othello.model.IBoard;
import othello.players.learnplayers.AbstractNeuralNetworkPlayer.BenchmarkState;

public interface IPlayer extends IPlayerInfo, Observer {

    /**
     * Called after the player is constructed, telling it what board it has
     * been assigned to play on, and what color they would like it to be.
     * Note that because IPlayerInfo.getColor() returns an arbitrary color,
     * you do not need to return the color you are assigned.  Just be close :)
     * @param board
     * @param color 
     *
     */
    public void joinBoard(IBoard board, Color color);

    /**
     * Notifies this player that their turn has begun.
     */
    public void beginTurn();

    /**
     * Notifies this player that their turn has ended (i.e. their move
     * instructions have been received and processed).
     */
    public void endTurn();
    
    /**
     * Notifies the player that the game has end.
     * This makes it possible to update any learning algorithm
     */
    public void endGame();
    
    public void won(BenchmarkState benchmarkState);

    public void tied(BenchmarkState benchmarkState);

    public void lost(BenchmarkState benchmarkState);
    
    public boolean isActive();

    public void setActive(boolean active);
    
    public void setColor(Color color);

    public void resetPlayResults();

	public void storeRatio();

	public void saveRatios();	
	
	public List<Action> getAvailableActions(IBoard brd);	
	
}
